package com.xique.park.bean.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xique.common.core.annotation.Excel;
import com.xique.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.annotation.Transient;

import java.util.Date;
import java.util.List;

/**
 * 设备上下线日志记录对象 t_park_device_online_log
 *
 * @author xique
 * @date 2021-12-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ParkDeviceOnlineLog extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 车场id
     */
    @Excel(name = "车场id")
    private Long parkId;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    private String deviceCode;

    /**
     * 设备上线|下线时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "设备上线|下线时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    /**
     * online：上线；offline下线
     */
    @Excel(name = "online：上线；offline下线")
    private String status;

    @Transient
    private String deviceCodes;


    @Transient
    private String laneName;

    @Transient
    private String deviceName;

    private Date startTime;

    private Date endTime;

    @TableField(exist = false)
    private List<String> deviceCodeList;
}
